package com.ruibang.glass.quality.domain.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruibang.glass.quality.constant.Constants;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author: songJinKang
 * @CreateTime: 2024-01-11  16:15
 * @Description: TODO
 * @Version: 1.0
 */
@Data
public class DefectDetailReq {
    @ApiModelProperty("开始时间")
    @NotNull(message = "请选择开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;
    @ApiModelProperty("结束时间")
    @NotNull(message = "请选择结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
    @NotBlank(message = "请选择查询维度")
    @ApiModelProperty("1:检查时间，2:横切时间")
    private String queryDimension;
    @ApiModelProperty("投入类型")
    private String isDirectInvestment;
    @ApiModelProperty("规则")
    private List<DefectRuleDetailReq> defectRuleDetail;
    @ApiModelProperty("是否查询  1：是，2：否")
    private String isQuery = Constants.ONE_STR;
}
